<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Rep\OrderPrintRep;
use Illuminate\Http\Request;

class OrderPrint extends Controller
{
    protected $rep;

    public function __construct(Request $request)
    {
        $this->rep = new OrderPrintRep();
    }
    //工单打印列表
    public function getOrderPrintList(Request $request){
        $params = $request->all();
        $data = $this->rep->getOrderPrintListRep($params);
        return re(0,$data,'success');
    }

    //添加到打印列表
    public function addOrderPrint(Request $request){
        $params = $request->all();
        $data = $this->rep->addOrderPrintRep($params);
        return re(0,$data,'success');
    }


    /**
     * 打印
     * @param Request $request
     */
    public function orderPrint(Request $request){
        $params = $request->all();
        $data = $this->rep->orderPrintRep($params);
        return re(0,$data,'success');
    }

    /**
     * 删除打印
     * @param Request $request
     */
    public function delOrderPrint(Request $request){
        $params = $request->all();
        $data = $this->rep->delOrderPrintRep($params);
        return re(0,$data,'success');
    }

}
